unit UTurmas;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Grids, Buttons, ComCtrls;

type
  TfrmCadTurmas = class(TForm)
    Panel1: TPanel;
    Label3: TLabel;
    Label1: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Edit3: TEdit;
    ComboBox1: TComboBox;
    Edit2: TEdit;
    Edit4: TEdit;
    Button1: TButton;
    Panel2: TPanel;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    BitBtn4: TBitBtn;
    GroupBox6: TGroupBox;
    ComboBox2: TComboBox;
    StringGrid1: TStringGrid;
    Label2: TLabel;
    Edit1: TEdit;
    Button2: TButton;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormShow(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure BitBtn4Click(Sender: TObject);
    procedure StringGrid1SelectCell(Sender: TObject; ACol, ARow: Integer;
      var CanSelect: Boolean);
  private
    { Private declarations }
  public
    aux, aux2:String;
    { Public declarations }
  end;

var
  frmCadTurmas: TfrmCadTurmas;

implementation

uses UIncluiAluno, UComporTurma, UListaModa;

{$R *.dfm}

procedure TfrmCadTurmas.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  frmCadTurmas.Release;
  frmCadTurmas := nil;
end;

procedure TfrmCadTurmas.FormShow(Sender: TObject);
begin
  StringGrid1.Cells[0,0]:='Turma';
  StringGrid1.Cells[1,0]:='Professor';
  StringGrid1.Cells[2,0]:='Nro Vagas';
  StringGrid1.Cells[3,0]:='Trimestre';
  StringGrid1.Cells[4,0]:='Ano Letivo';
  StringGrid1.Cells[0,1]:='Turma AB001';
  StringGrid1.Cells[1,1]:='Luiz Henrique Elias Bulzoni';
  StringGrid1.Cells[2,1]:='45';
  StringGrid1.Cells[3,1]:='2';
  StringGrid1.Cells[4,1]:='2006';

  StringGrid1.Cells[0,3]:='Turma AB002';
  StringGrid1.Cells[1,3]:='Marcus Vinicios Castro';
  StringGrid1.Cells[2,3]:='45';
  StringGrid1.Cells[3,3]:='2';
  StringGrid1.Cells[4,3]:='2006';

  StringGrid1.Cells[0,2]:='Turma AT003';
  StringGrid1.Cells[1,2]:='Paula dos Santos';
  StringGrid1.Cells[2,2]:='50';
  StringGrid1.Cells[3,2]:='2';
  StringGrid1.Cells[4,2]:='2006';

  aux:= StringGrid1.Cells[0,1];
  aux2:= StringGrid1.Cells[2,1];
end;

procedure TfrmCadTurmas.Button1Click(Sender: TObject);
begin
try
 if frmListaMod = Nil then
  begin
   frmListaMod := TfrmListaMod.Create(self);
   frmListaMod.Show;
  end
  else
  begin
   frmListaMod.Show;
   frmListaMod.WindowState:= wsMaximized;
  end; // Begin
except
  ShowMessage('Erro ao tentar exibir a tela de listas de modalidades!');
end; // TRY
end;

procedure TfrmCadTurmas.BitBtn4Click(Sender: TObject);
begin
  Close;
end;

procedure TfrmCadTurmas.StringGrid1SelectCell(Sender: TObject; ACol,
  ARow: Integer; var CanSelect: Boolean);
begin
  aux:= StringGrid1.Cells[1,ARow];
  aux2:= StringGrid1.Cells[2,ARow];
end;

end.
